<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增FTP存贷款收益率曲线')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-config-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">期限中文名称:</label>
            <div class="col-sm-8">
                <input name="configName" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">期限类型:</label>
            <div class="col-sm-8">
                <select name="configType" class="form-control m-b" th:with="type=${@dict.getType('ftp_duration_type')}"
                        required>
                    <option value="">请选择</option>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">期限标识:</label>
            <div class="col-sm-8">
                <select name="configKey" class="form-control m-b" th:with="type=${@dict.getType('ftp_base_frequency_type')}"
                        required>
                    <option value="">请选择</option>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">下限天数:</label>
            <div class="col-sm-8">
                <input name="configUnderDay" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">上限天数:</label>
            <div class="col-sm-8">
                <input name="configUpperDay" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">利率:</label>
            <div class="col-sm-8">
                <input name="configRate" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注:</label>
            <div class="col-sm-8">
                <input name="remark" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">

    var prefix = ctx + "ecard/ftp/rate/config";

    $("#form-config-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-config-add').serialize());
        }
    }
</script>
</body>
</html>